cmake_minimum_required (VERSION 2.8)
project(TEST)

FILE(GLOB SOURCE_FILES ./*.cpp)

add_executable(TEST ${SOURCE_FILES})

set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_SUPPRESS_REGENERATION TRUE)

FILE(READ filter.txt CONTENTS)
#MESSAGE(${cc})

string(REPLACE "\n" ";" LIST_CONTENTS ${CONTENTS})

#MESSAGE(${LIST_CONTENTS})

FOREACH(LINE ${LIST_CONTENTS})
	string(REPLACE " " ";" group ${LINE})
	LIST(GET group 0 name)
	LIST(GET group 1 filter)
	source_group(${filter} FILES ${name})
	#MESSAGE(${name})
	#MESSAGE(${filter})
ENDFOREACH()






